<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>一级导航列表</title>
    <link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">
		<link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
		<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script>
	

  </head>
  
<body class="content1">
		<div class="header">
			<h1 class="page-title">
				一级导航管理
			</h1>
		</div>
		<ul class="breadcrumb">
			<li>
				<a href="<%=basePath%>/sys/welcome.jsp">Home</a>
				<span class="divider">/</span>
			</li>
			<li class="active">
				一级导航列表
			</li>
		</ul>
		<div class="container-fluid">
			<div class="row-fluid">
				<form class="form-inline" method="post"
					action="<%=basePath%>sys/fun?cmd=list">
					<a class="btn btn-primary" href="<%=basePath%>sys/nav/add.jsp">
						<i class="icon-plus"></i> 新建一级导航
					</a>
				</form>

				<div class="well">
					<table class="table">
						<thead>
							<tr>
			
								<th>
									导航名称
								</th>
								<th>
									排序序号
								</th>
								<th>
									状态
								</th>
								<th style="width: 90px;text-align:center" colspan="2">
									编辑
								</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${navlist}" var="item">
								<tr>
									<td>
										${item.name}
									</td>
									<td>
										${item.orders}
									</td>
									<td>
									<c:if test="${item.navstate==1}">正常</c:if>
									<c:if test="${item.navstate!=1}">禁用</c:if>
										
									</td>
									<td colspan="2" style="text-align:center">
										<a href="<%=basePath%>sys/nav?cmd=toedit&nid=${item.nid}">编辑</a>
										&ensp;
										<a href="<%=basePath%>sys/nav/addsub.jsp?pid=${item.nid}&pname=${item.name}">新增子导航</a>
										&ensp;
										<a href="<%=basePath%>sys/nav?cmd=listsub&nid=${item.nid}">查看子导航</a>
			
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
			
				</div>
			</div>
		</div>
	</body>
</html>
